package com.axend.aerosense.base.database.room;


import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;
import androidx.room.Update;

import com.axend.aerosense.base.bean.RoomTypeBean;

import java.util.List;

@Dao
public interface RoomTypeDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(RoomTypeBean roomTypeBean);

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insertList(List<RoomTypeBean> roomTypeBean);

    @Query("delete from RoomTypeBean where roomType=:type")
    void deleteRoomType(int type);

    @Query("select * from RoomTypeBean")
    List<RoomTypeBean> getAll();

    @Query("select * from RoomTypeBean where roomType=:type")
    RoomTypeBean queryRoomType(int type);

    @Update
    void updateRoomType(RoomTypeBean roomTypeBean);
}
